#include "ChatList.h"

ChatListIterator ChatList::get(int from) {
    return list.find(from);
}

int ChatList::lastmsg() {
	return lastput;
}

void ChatList::put(ChatMessage message) {
    list.insert(list.end(), std::pair<int, ChatMessage>(lastput, message));
    if(list.size() > 30) list.erase(list.begin());
    lastput++;
}
